import request from '@/utils/request'

export function getUsers(data) {
  return request({
    url: '/sys/user',
    params: data
  })
}

export function getEmployeeSimple() {
  return request({
    url: '/sys/user/simple'
  })
}

export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}

export function delEmployee(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}

export function importEmloyee(data) {
  return request({
    method: 'post',
    url: '/sys/user/batch',
    data
  })
}

export function getRoles(params) {
  return request({
    url: '/sys/role',
    method: 'GET',
    params
  })
}

export function addAassign(data) {
  return request({
    url: '/sys/user/assignRoles',
    method: 'put',
    data
  })
}

